Skip to content

Allow Protobuf byte fields to copy into new allocations - #27323

Draft
jonahgetz wants to merge 5 commits into
vectordotdev:masterfrom
jonahgetz:restore-tonic
Draft

jonahgetz wants to merge 5 commits into
vectordotdev:masterfrom
jonahgetz:restore-tonic

Conversation

@jonahgetz

Copy link
Copy Markdown

Summary

This PR implements a custom Tonic codec that restores the behavior of protobuf byte field decoding prior to grpc/grpc-rust#1695, which landed in Tonic 0.12 and thus Vector 0.61.

Protobuf byte fields are now copied into new allocations instead of referencing the buffer that the original RPC message was received into.

References

Closes: #27322

How did you test this PR?

This was tested on a vector pipeline using a unified architecture. The pipeline includes vector deployed as an agent sending to an aggregator, then to an s3 sink.

Stock 0.61.0 uses ~2.5x more memory than stock 0.60.0 on our pipeline. Verified that this PR reduces memory usage back to 0.60.0 levels.

Does this PR include user facing changes?

  • Yes. Please add a changelog fragment based on our guidelines.
    For a new deprecation announcement, follow the deprecation policy and add a deprecation.d/ notice instead.
  • No. A maintainer will apply the no-changelog label to this PR.

Contributor Guidelines

  • Please read our Vector contributor resources.
  • Do not hesitate to use @vectordotdev/vector to reach out to us regarding this PR.
  • Before pushing, follow our pre-push guidance.
  • After a review is requested, please avoid force pushes to help us review incrementally.
    • Feel free to push as many commits as you want. They will be squashed into one before merging.
    • For example, you can run git merge origin master and git push.

@jonahgetz jonahgetz changed the title Restore tonic Allow Protobuf byte fields to copy into new allocations Nov 25, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Increased memory usage in vector 0.61

1 participant